home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0527.dms / q0527.adf / assert.h < prev    next >
C/C++ Source or Header  |  1991-02-02  |  506b  |  29 lines

  1.  
  2. /*
  3.  *  ASSERT.H
  4.  *
  5.  *  (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  6.  *
  7.  *  relatively optimized, takes advantage of GNU-cpp __BASE_FILE__ macro
  8.  *  allowing us to store the filename string once in a static decl.
  9.  */
  10.  
  11. #ifndef _ASSERT_H
  12. #define _ASSERT_H
  13.  
  14. static char *__BaseFile = __BASE_FILE__;
  15.  
  16. extern void __FailedAssert(char *, int);
  17.  
  18. #ifndef assert
  19. #ifdef NDEBUG
  20. #define assert(ignore)
  21. #else
  22. #define assert(exp)     if (!(exp)) __FailedAssert( __BaseFile, __LINE__);
  23. #endif
  24. #endif
  25.  
  26. #endif
  27.  
  28.  
  29.